<!DOCTYPE html>
<html>
	<head>
	    <meta charset="utf-8">
	    <meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width" />
	    <meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
	    <title>Hello APP</title>
	    <link rel="stylesheet" type="text/css" href="../../css/index.css" />
	</head>
	<style type="text/css">
		.warp{width: 100%;}

	    /*评价信息*/
	    .pinjia-info{width: 100%;background: #FFFFFF;}
	    .pinjia-info .pinjia-box{width: 100%;padding: 0 15px;box-sizing: border-box;background: #FFFFFF;}
	    .pinjia-info .pinjia-box .pinjia-one{width: 100%;padding: 26px 0;box-sizing: border-box;}
	    .pinjia-info .pinjia-box .pinjia-one .l{flex-shrink: 0;}
	    .pinjia-info .pinjia-box .pinjia-one .l .head{width: 40px;height: 40px;border-radius:50%;overflow: hidden;}
	    .pinjia-info .pinjia-box .pinjia-one .r{padding-left: 10px;box-sizing: border-box;}
		.pinjia-info .pinjia-box .pinjia-one .r .user-box{width: 100%;height: 20px;align-items: center;align-items:center;}
		.pinjia-info .pinjia-box .pinjia-one .r .user-box .name{padding-right:5px;box-sizing: border-box;}
		.pinjia-info .pinjia-box .pinjia-one .r .user-box .pin-xin{align-items: center;}
		.pinjia-info .pinjia-box .pinjia-one .r .user-box .pin-xin img{width: 13px;height: 13px;margin-left: 2px;display: block;}
		.pinjia-info .pinjia-box .pinjia-one .r .center-box{width: 100%;height: 20px;font-size: 12px;color: #8E9194;align-items:center;}
		.pinjia-info .pinjia-box .pinjia-one .r .center-box .guige{line-height: 20px;padding-left: 10px;box-sizing: border-box;text-align: right;}
		.pinjia-info .pinjia-box .pinjia-one .r .text-box{font-size: 16px;color: #333333;padding-top: 10px;box-sizing: border-box;margin-bottom: 10px;white-space:normal; word-break:break-all;}
		.pinjia-info .pinjia-box .pinjia-one .r .huifu{background: #F8F8F8;width: 100%;padding: 12px;box-sizing: border-box;color: #8E9194;white-space:normal; word-break:break-all;}
		.pinjia-info .pinjia-box .pinjia-one .r .img-box{width: 100%;margin-top: 10px;box-sizing: border-box;flex-wrap: wrap;}
		.pinjia-info .pinjia-box .pinjia-one .r .img-box .img-one{width: 23.5%;padding-bottom: 23.5%;overflow: hidden;margin-right: 2%;margin-bottom: 10px;flex-shrink: 0;}
		.pinjia-info .pinjia-box .pinjia-one .r .img-box .img-one:nth-child(4n){margin-right: 0;}
		.pinjia-info .pinjia-box .pinjia-one:last-child:before{display: none;}

	</style>
	<body>
		<div id="vue" class="warp">
			<div class="pinjia-info">
				<div class="pinjia-box" style="display:none;" :style="{ display:(Pdata ? '':'none')}">
					<div class="pinjia-one flex border-bottom" v-for="(item,key) in Pdata.listData">
						<div class="l">
							<div class="head bgpic" :style="{backgroundImage:'url('+ item.avatar +')'}"></div>
						</div>
						<div class="r flex1">
							<div class="user-box flex">
								<div class="name flex1 han_1" v-text="item.nickname"></div>
								<div class="pin-xin flex">
									<img v-for="count in item.lv" src="../../image/main0/px_1.png"/>
									<img v-for="count in 5-item.lv" src="../../image/main0/px_0.png"/>
								</div>
							</div>
							<div class="center-box flex">
								<div class="time" v-text="item.addtime"></div>
								<div class="guige han_1 flex1" v-text="item.goodskey"></div>
							</div>
							<div class="text-box" v-text="item.content ? item.content : '没有评价内容...'"></div>
							<div class="img-box flex">
								<div class="img-one bgpic" v-for="(i,k) in item.images" :data-path="i" :data-index="k" :style="{backgroundImage:'url('+ i +')'}" tapmode onclick="openBig(this)"></div>
							</div>
							<div class="huifu" v-if="item.huifu" v-text="item.huifu"></div>
						</div>
					</div>
				</div>
			</div>

			<!--占位图-->
			<div class="nodata" style="display:none;" :style="{ display:(noData ? '':'none')}">
				<img src="../../image/no_page/no_yaoqing.png" />
				<p>暂无评价</p>
			</div>

			<!-- 底部 -->
			<div class="bottom-box" :style="{ display:(loadingMsg ? '':'none')}">
				<div class="msgbox" v-html="loadingMsg" style="color:#999;"></div>
			</div>

		</div>
	</body>
</html>
<script type="text/javascript" src="../../script/base.min.js" id="loadjs" data-js="L/swiper.min,L/lazyload,L/h-tool"></script>
<script type="text/javascript">
	define(function (require, exports, module) {

		_page.getData = function(loading) {
			lanYun.getVueData({url:'user/pinjialist',get:{page:lanYun.page},cache:0,loading:loading},function(ret) {
				//console.log(JSON.stringify(ret));
			});
		};

		lanYun.newVue('#vue',function() {
			_page.getData(2);
		});

		//滚动加载..
		new auiScroll({distance:200, listen:true},function(ret) {
			if($(window).scrollTop() < 2) ret.isToBottom = false;
			var d = ret.scrollTop / 208;
			if(!ret.isToBottom) return;
			_page.getData(0);
		});

		// 点击图片放大
		openBig = function(tis){
			var UIPhotoViewer = api.require('UIPhotoViewer');
			var images = [];
			var data = tis.dataset;
			$(tis).parent().find('.bgpic').each(function(){
				var dst = this.dataset;
				images.push(dst.path);
			});
			UIPhotoViewer.open({
				images: images,
				activeIndex: data.index,
				placeholderImg: 'widget://res/img/apicloud.png',
				bgColor: '#000',
				gestureClose: true
			}, function(ret, err) {
				if (ret.eventType == 'click') {
					UIPhotoViewer.close();
				}
			});
		};

		//去评价
		topMenuClick = function () {
	        lanYun.openWin('ordert/ordert_list.html', {
	            win:'win',
	           	title:"我的订单",
	            frameParam : {sta:4}
	       });
		}
	});
</script>
